package com.qiqi.web.man;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qiqi.dao.PhoneNumberMapper;
import com.qiqi.domain.PhoneNumber;
import com.qiqi.domain.PhoneNumberExample;

@Controller
public class  ManIndexController {
	@Autowired
	private PhoneNumberMapper phoneNumberMapper;
	@RequestMapping("/man")
	public String list(){
		PhoneNumberExample q = new PhoneNumberExample();
		phoneNumberMapper.selectByExample(q);
		return "/man/welcome";
	}
	@RequestMapping("/man/num/{id}")
	@ResponseBody
	public PhoneNumber detail(@PathVariable Integer id){
		PhoneNumber phoneNumber = phoneNumberMapper.selectByPrimaryKey(id);
		return phoneNumber;
	}
}
